package com.bungarus.model;

import org.springframework.data.mongodb.core.MongoTemplate;

/**
 * Created by tang on 2018/11/28.
 */

public class RetryFailedMessageRepository {
    private MongoTemplate mongoTemplate;

    public RetryFailedMessageRepository(MongoTemplate mongoTemplate) {
        this.mongoTemplate = mongoTemplate;
    }

    public void add(RetryFailedMessage message, String collectionName) {
        mongoTemplate.save(message, collectionName);
    }
}
